package cn.sx.yys.support;

/**
 *
 * @author 猿帅
 * @email 1603194187@qq.com
 * @date 2021/1/29 15:13
 */
public enum ErrorCode {
    //
    Success(200, "请求成功"),
    LoginError(401,"用户未登录"),
    ParamError(417,"参数有误"),
    IdError(1001, "ID参数错误"),
    AuthError(1002, "用户名或密码错误"),
    UserDisable(1003, "账户不可用"),
    PhoneError(1004,"此手机号已注册"),
    EmailError(1005,"此邮箱已注册"),
    CodeError(1006,"验证码错误"),
    FormError(1007,"请正确填写表单")
    ;

    private int code;

    private String text;

    ErrorCode(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public String toString() {
        return "{" +
                "code=" + code +
                ", text='" + text + '\'' +
                '}';
    }
}
